package com.lekang.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lekang.mapper.FamilyMemberMapper;
import com.lekang.domain.FamilyMember;
import com.lekang.service.IFamilyMemberService;

/**
 * 家属Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-14
 */
@Service
public class FamilyMemberServiceImpl implements IFamilyMemberService 
{
    @Autowired
    private FamilyMemberMapper familyMemberMapper;

    /**
     * 查询家属
     * 
     * @param id 家属主键
     * @return 家属
     */
    @Override
    public FamilyMember selectFamilyMemberById(Long id)
    {
        return familyMemberMapper.selectFamilyMemberById(id);
    }

    /**
     * 查询家属列表
     * 
     * @param familyMember 家属
     * @return 家属
     */
    @Override
    public List<FamilyMember> selectFamilyMemberList(FamilyMember familyMember)
    {
        return familyMemberMapper.selectFamilyMemberList(familyMember);
    }

    /**
     * 新增家属
     * 
     * @param familyMember 家属
     * @return 结果
     */
    @Override
    public int insertFamilyMember(FamilyMember familyMember)
    {
        return familyMemberMapper.insertFamilyMember(familyMember);
    }

    /**
     * 修改家属
     * 
     * @param familyMember 家属
     * @return 结果
     */
    @Override
    public int updateFamilyMember(FamilyMember familyMember)
    {
        return familyMemberMapper.updateFamilyMember(familyMember);
    }

    /**
     * 批量删除家属
     * 
     * @param ids 需要删除的家属主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberByIds(Long[] ids)
    {
        return familyMemberMapper.deleteFamilyMemberByIds(ids);
    }

    /**
     * 删除家属信息
     * 
     * @param id 家属主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberById(Long id)
    {
        return familyMemberMapper.deleteFamilyMemberById(id);
    }
}
